<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>学生成绩管理系统 登陆</title>
    <link rel="shortcut icon" href="favicon.ico"/>
    <link rel="bookmark" href="favicon.ico"/>

    <script type="text/javascript" th:inline="javascript">

        /*<![CDATA[*/

        $(function(){
            //点击图片切换验证码
            // $("#vcodeImg").click(function(){
            //     this.src="@{/index/checkcode}&t="+new Date().getTime();
            //     var uri = /*[[@{/checkCode}]]*/;
            //     this.src = uri + '?t=' + new Date().getTime();
            //     console.log(this.src);
            // });

            //登录
            $("#submitBtn").click(function(){
                $.ajax({
                    type: "post",
                    url: [[@{/login}]],
                    data: $("#form").serialize(),
                    dataType: "json", //返回数据类型
                    success: function(data){
                        if(data.success){
                            window.location.href = [[@{/index/main}]];
                        }else{
                            $.messager.alert("消息提醒", data.message, "warning");
                            $("#vcodeImg").click();//切换验证码
                            $("input[name='code']").val("");//清空验证码输入框
                        }
                    }

                });
            });

            //跳转注册界面
            $("#registryBtn").click(function(){
                window.location.href = [[@{/registry}]];
        });

            //设置复选框
            $(".skin-minimal input").iCheck({

                radioClass: 'iradio-blue',
                increaseArea: '25%',
            });
        })
        /*]]>*/
    </script>
    <title>登录|学生成绩管理系统</title>
    <meta name="keywords" content="学生成绩管理系统">
</head>
<body>

<div class="header" style="padding: 0;">
    <h2 style="color: white; width: 400px; height: 60px; line-height: 60px; margin: 0 0 0 30px; padding: 0;">学生成绩管理系统</h2>
</div>
<div class="loginWraper">
    <div id="loginform" class="loginBox">
        <form id="form" class="form form-horizontal" method="post">
            <div class="row cl">
                <label class="form-label col-3"><i class="Hui-iconfont">&#xe60d;</i></label>
                <div class="formControls col-8">
                    <input id="username" name="username" type="text" placeholder="用户名" class="input-text size-L">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-3"><i class="Hui-iconfont">&#xe60e;</i></label>
                <div class="formControls col-8">
                    <input id="password" name="password" type="password" placeholder="密码" class="input-text size-L">
                </div>
            </div>
            <!--      <div class="row cl">-->
            <!--        <div class="formControls col-8 col-offset-3">-->
            <!--          <input class="input-text size-L" name="code" type="text" placeholder="请输入验证码" style="width: 200px;">-->
            <!--          <img title="点击图片切换验证码" id="vcodeImg" th:src="@{/checkCode}"></div>-->
            <!--      </div>-->
            <br>
            <style>
                .radio-box{color: #fcc900}
            </style>
            <div class="mt-20 skin-minimal" style="text-align: center;">
                <div class="radio-box" >
                    <input type="radio" id="radio-2" name="type" checked value="2" />
                    <label for="radio-1">学生</label>
                </div>
                <div class="radio-box">
                    <input type="radio" id="radio-3" name="type" value="3" />
                    <label for="radio-2">老师</label>
                </div>
                <div class="radio-box">
                    <input type="radio" id="radio-1" name="type" value="1" />
                    <label for="radio-3">管理员</label>
                </div>
            </div>

            <div class="row">
                <div class="formControls col-8 col-offset-3">
                    <input id="submitBtn" type="button" class="btn btn-success radius size-L" value="&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;">
                </div>
            </div>

            <div class="row">
                <div class="formControls col-8 col-offset-3">
                    <input id="registryBtn" type="button" class="btn btn-success radius size-L" value="&nbsp;未&nbsp;曾&nbsp;注&nbsp;册&nbsp;？&nbsp;">
                </div>
            </div>

        </form>
    </div>
</div>
<div class="footer">欢迎登陆</div>
</body>
</html>